

using System;
using System.Text;

using NHibernate;
using NHibernate.Cfg;
using NHibernate.Criterion;
using NHibernate.Exceptions;

using SpotifyGenNHibernate.EN.Spotify;
using SpotifyGenNHibernate.CAD.Spotify;

namespace SpotifyGenNHibernate.CEN.Spotify
{
        public partial class TPVCEN
        {
        private ITPVCAD _ITPVCAD;

        public TPVCEN(ITPVCAD _ITPVCAD)
        {
                this._ITPVCAD = _ITPVCAD;
        }

        public int NuevoTPV (int p_TipoPago, String p_usuario, String p_NombreBanco)
        {
                TPVEN tPVEN = null;
                int oid;

                //Initialized TPVEN
                tPVEN = new TPVEN ();
                tPVEN.TipoPago = p_TipoPago;
                if (p_usuario != null) {
                        tPVEN.Usuario = new SpotifyGenNHibernate.EN.Spotify.UsuarioEN ();
                        tPVEN.Usuario.Nombre = p_usuario;
                }
                tPVEN.NombreBanco = p_NombreBanco;
                //Call to TPVCAD

                oid = _ITPVCAD.NuevoTPV (tPVEN);
                return oid;
        }
        }
}
